<div id="page-wrapper">
    <!-- /.row -->
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <span class="judul-page">Pengaturan Kelas</span>
                    <div class="clearfix"></div>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                      <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th width="50">#</th>
                                <th>Tahun Ajaran</th>
                            </tr>
                        </thead>
                        <tbody>
						<?php 
							if(count($list)>0){
								$i = 1; 
								foreach ($list as $row) {
						?>										
                            <tr class="kursor">
                                <td><?php echo $i++ ?></td>
                                <td><?php echo $row->th_ajaran; ?> <a href="<?php echo site_url('atur_kelas/lembaga/'.$row->id_mr_th_ajaran);?>" class="pull-right btn btn-info btn-xs" title="Detail"><span class="glyphicon glyphicon-file"></span></a></td> 
                            </tr>
						<?php
								}
							}else{
						?>
							<tr>
                                <td colspan="2"><center>Belum ada data master tahun ajaran</center></td>
							</tr>
						<?php
							}
						?>
                        </tbody>
                      </table>
                    </div>
                    <div class="clearfix"></div>
                    <center>
                    <?php
                    echo ! empty($pagination) ? '<center><div class="pagination">' . $pagination . '</div></center>' : '';
                    ?>
                    </center>
                </div>
            </div>
        </div>
    </div>
    <!-- /.row -->
</div>
<!-- /#page-wrapper -->
<script>
$("tr").click(function() {
  window.location.href = $(this).find("a").attr("href");
});
</script>